class LoseWeight:
    def __init__(self, weight):
        self.weight = weight

    def running(self):
        if self.weight > 40:
            self.weight -= 0.5
        else:
            print('别跑了，再跑人没了')

    def eating(self):
        self.weight += 1

    def get_weight(self):
        return self.weight


if __name__ == '__main__':
    xiaoming = LoseWeight(75)
    xiaomei = LoseWeight(45)
    xiaoming.running()
    xiaomei.running()
    xiaoming.eating()
    xiaomei.eating()
    xiaoming.running()
    xiaomei.running()
    xiaoming.eating()
    xiaomei.eating()
    print(xiaomei.get_weight())
    print(xiaoming.get_weight())
